/**
 * @Author YuanYuan
 * @Date 2022/8/2
 * @Time 13:33
 */
public class TestDemo {
    public static void main(String[] args) {
        LinkedList linkedList = new LinkedList();
//        linkedList.addFirst(1);
//        linkedList.addFirst(2);
//        linkedList.addFirst(3);
//        linkedList.display();
//        System.out.println("======================");
//        linkedList.addLast(4);
//        linkedList.addLast(5);
//        linkedList.addLast(6);
//        linkedList.display();
//        System.out.println("=====================");
        linkedList.addIndex(0,9);
        linkedList.addIndex(1,8);
        linkedList.addIndex(1,7);
        linkedList.addIndex(1,7);
        linkedList.display();
        System.out.println("=====================");
        System.out.println(linkedList.size());
        System.out.println("=====================");
        System.out.println(linkedList.contains(7));
        System.out.println("=====================");
       // linkedList.remove(7);
        //linkedList.remove(8);
        linkedList.display();
        System.out.println("====================");
        linkedList.removeAllKey(7);
        linkedList.display();
        System.out.println("====================");
        linkedList.clear();
        linkedList.display();

    }
}
